<?php
namespace app\common\model;
use think\Model;

class AccountModel extends Model{
    protected  $name = 'account';
    protected  $pk   = 'account_id';

    public static function onBeforeInsert($model)
    {
        $model->set("create_ip", request()->ip());
    }
    
    public function setPwdAttr($value)
    {
        return md5($value);
    }
    // public function getPwdAttr($value)
    // {
    //     return '';
    // }
}